"""Moyun URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path

import message.views, usermanage.views, Book.views, blog.views, group.views

urlpatterns = [
    path('admin/', admin.site.urls),
    path('get_profile/', usermanage.views.Profiles.get_profile),
    path('register/', usermanage.views.Users.user_register),
    path('login/', usermanage.views.Users.user_login),
    path('logout/', usermanage.views.Users.user_logout),
    path('ban/', usermanage.views.Users.switch_ban_status),
    path('modifypassword/', usermanage.views.Users.modifypassword),
    path('resetpassword/', usermanage.views.Users.resetpassword),
    path('resertquestion/', usermanage.views.Users.get_resetquestion),
    path('follow/', usermanage.views.Users.follow),
    path('getfolloweds/', usermanage.views.Users.get_followeds),
    path('getfollows/', usermanage.views.Users.get_follows),
    path('getfollowstates/', usermanage.views.Users.get_follow_state),
    path('switchadmin/', usermanage.views.Users.switchadmin),
    path('notes/', message.views.message.notes),
    path('chat/', message.views.message.chat),
    path('getchat/', message.views.message.get_chat),
    path('getback/', message.views.message.get_back),
    path('delchat/', message.views.message.del_chat),
    path('refusechat/', message.views.message.refuse_chat),
    path('acceptchat/', message.views.message.accept_chat),
    path('refusenotes/', message.views.message.refuse_notes),
    path('mmm/', message.views.message.mmm),
    path('allbooklist/', Book.views.Book.all_book_list),
    path('accordingauthor/', Book.views.Book.according_author),
    path('accordingtitle/', Book.views.Book.according_title),
    path('accordingtags/', Book.views.Book.according_tags),
    path('alltaglist/', Book.views.Book.all_tag_list),
    path('followbook/', Book.views.Book.follow_book),
    path('unfollowbook/', Book.views.Book.unfollow_book),
    path('getfollowlist/', Book.views.Book.get_follow_list),
    path('addbook/', Book.views.Book.add_book),
    path('deletebook/', Book.views.Book.delete_book),
    path('createblog/', blog.views.BlogManage.createBlog),
    path('deleteblog/', blog.views.BlogManage.deleteBlog),
    path('editblog/', blog.views.BlogManage.editBlog),
    path('getbloginfo/', blog.views.BlogManage.getBlogInfo),
    path('getallblogs/', blog.views.BlogManage.getAllBlogs),
    path('likeblog/', blog.views.BlogManage.setBlogLike),
    path('collectblog/', blog.views.BlogManage.setBlogCollect),
    # path('gethotblogs/', blog.views.BlogManage.getHotBlogs),
    path('searchblog/', blog.views.BlogManage.search_blog),
    path('getcollectblog/', blog.views.BlogManage.get_collect_blog_list),
    path('postcomment/', blog.views.BlogManage.post_comment),
    path('getcomment/', blog.views.BlogManage.get_comment),
    path('postreport/', blog.views.CreateReport.create_report),
    path('getreport/', blog.views.CreateReport.get_report),
    path('handlereport/', blog.views.CreateReport.handle_report),
    path('creategroup/', group.views.GroupManager.createGroup),
    path('deletegroup/', group.views.GroupManager.deleteGroup),
    path('serachgroup/', group.views.GroupManager.searchGroupByName),
    path('getgroupinfo/', group.views.GroupManager.getGroupInfo),
    path('changegroupintro/', group.views.GroupManager.changeGroupIntro),
    path('deletegroupuser/', group.views.GroupManager.deleteUser),
    path('applyjoingroup/', group.views.GroupManager.applyJoinGroup),
    path('getgroupapplylist/', group.views.GroupManager.getApplyList),
    path('handlegroupapply/', group.views.GroupManager.handleApplication),
    path('addgroupadmin/', group.views.GroupManager.addAdmin),
    path('getgroupadmins/', group.views.GroupManager.getAdminList),
    path('getgroupusers/', group.views.GroupManager.getGroupUserList),
    path('changegroupuserlevel/', group.views.GroupManager.changeUserTitleLevel),
    path('changegroupapplyperm/', group.views.GroupManager.changeApplyPermission),
    path('changegroupvis/', group.views.GroupManager.changeVisibility),
]
